﻿@model BootStrap.HtmlHelper.Sample.Models.FormModel
@{
	ViewBag.Title = "Form Demo";
}

<h2>Car Data</h2>

<form class="form-horizontal well" action="@Url.Action("Index")" method="post">
	
	@Html.TextControlFor(m => m.Year)
	@Html.TextControlFor(m => m.Miles)
	@Html.CheckBoxControlFor(m => m.IsUsed)
	@Html.DropDownListControlFor(m => m.MakeId, Model.Makes)

	@using (Html.BeginControlGroup("Size"))
	{
		@Html.RadioButtonControlFor(m => m.Size, "Full")
		@Html.RadioButtonControlFor(m => m.Size, "Midsize")
		@Html.RadioButtonControlFor(m => m.Size, "Compact")
	}
	@using(Html.BeginControlGroup("Features"))
	{
		@Html.MultiCheckBoxControlFor(m => m.HasAllWheelDrive)
		@Html.MultiCheckBoxControlFor(m => m.HasAntiLockBrakes)
		@Html.MultiCheckBoxControlFor(m => m.HasAntiTheftDevice)
		@Html.MultiCheckBoxControlFor(m => m.HasTractionControl)
	}
	@Html.TextAreaControlFor(s => s.Comments, 3, 5, null)
	<div class="controls">
		<input class="btn btn-large btn-primary" type="submit" value="Save"/>
	</div>
</form>
